package User;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xwl
 * Date: 2023-04-15
 * Time: 23:18
 */
public class NormalUser extends User {
    // 用户名字
    private String name;
    // 构造方法（无参）
    public NormalUser() {
        super();
    }
    // 构造方法（带参）
    public NormalUser(String name) {
        super();
        this.name = name;
    }
    // 菜单方法
    public void menu() {
        System.out.println("*****************");
        System.out.println("    1、查询图书    ");
        System.out.println("    2、借阅图书    ");
        System.out.println("    3、返还书籍    ");
        System.out.println("    0、退出系统    ");
        System.out.println("*****************");
    }
    // get name
    public String getName() {
        return name;
    }
    // set name
    public void setName(String name) {
        this.name = name;
        this.menu();
    }
    // toString
    @Override
    public String toString() {
        return "NormalUser{" +
                "name='" + name + '\'' +
                '}';
    }
}
